﻿using MS.InformationManagement.Presenter.InsertarRadicado;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using Moq;

namespace MS.InformationManagement.Test.InsertarRadicado
{
    
    
    /// <summary>
    ///This is a test class for InsertarRadicadoPresenterTest and is intended
    ///to contain all InsertarRadicadoPresenterTest Unit Tests
    ///</summary>
    [TestClass()]
    public class InsertarRadicadoPresenterTest
    {


        private TestContext testContextInstance;

        /// <summary>
        ///Gets or sets the test context which provides
        ///information about and functionality for the current test run.
        ///</summary>
        public TestContext TestContext
        {
            get
            {
                return testContextInstance;
            }
            set
            {
                testContextInstance = value;
            }
        }

        #region Additional test attributes
        // 
        //You can use the following additional attributes as you write your tests:
        //
        //Use ClassInitialize to run code before running the first test in the class
        //[ClassInitialize()]
        //public static void MyClassInitialize(TestContext testContext)
        //{
        //}
        //
        //Use ClassCleanup to run code after all tests in a class have run
        //[ClassCleanup()]
        //public static void MyClassCleanup()
        //{
        //}
        //
        //Use TestInitialize to run code before running each test
        //[TestInitialize()]
        //public void MyTestInitialize()
        //{
        //}
        //
        //Use TestCleanup to run code after each test has run
        //[TestCleanup()]
        //public void MyTestCleanup()
        //{
        //}
        //
        #endregion


        /// <summary>
        ///A test for InsertarRadicadoPresenter Constructor
        ///</summary>
        [TestMethod()]
        public void InsertarRadicadoPresenterConstructorTest()
        {

        }

        /// <summary>
        ///A test for HandleAssociatedRadicado
        ///</summary>w
        [TestMethod()]
        public void HandleAssociatedRadicadoTest()
        {
            IInsertarRadicadoView view = null; // TODO: Initialize to an appropriate value
            InsertarRadicadoPresenter target = new InsertarRadicadoPresenter(view); // TODO: Initialize to an appropriate value
            target.HandleAssociatedRadicado();
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

        /// <summary>
        ///A test for HandleLoad
        ///</summary>
        [TestMethod()]
        public void HandleLoadTest()
        {
            //Arrange
            var view = new Mock<IInsertarRadicadoView>();
            //Si se necesita setear variables por ejemplo en el HandleSave or update
            //se hace de la siguiente forma, para probar el metodo handle load no aplica
            view.Setup(c => c.CurrentList).Returns("diego");
            view.Setup(c => c.AssociatedAction).Returns("5"); 

            //Act
            InsertarRadicadoPresenter target = new InsertarRadicadoPresenter(view.Object);
            target.HandleLoad();

            //Assert           
            Assert.IsNotNull(view.Object.Modos);
            Assert.IsNotNull(view.Object.Tipos);
        
        }

        /// <summary>
        ///A test for HandleSave
        ///</summary>
        [TestMethod()]
        public void HandleSaveTest()
        {
            IInsertarRadicadoView view = null; // TODO: Initialize to an appropriate value
            InsertarRadicadoPresenter target = new InsertarRadicadoPresenter(view); // TODO: Initialize to an appropriate value
            target.HandleSave();
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

        /// <summary>
        ///A test for HandleUpdate
        ///</summary>
        [TestMethod()]
        public void HandleUpdateTest()
        {
            IInsertarRadicadoView view = null; // TODO: Initialize to an appropriate value
            InsertarRadicadoPresenter target = new InsertarRadicadoPresenter(view); // TODO: Initialize to an appropriate value
            target.HandleUpdate();
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

        /// <summary>
        ///A test for LoadRemitente
        ///</summary>
        [TestMethod()]
        public void LoadRemitenteTest()
        {
            IInsertarRadicadoView view = null; // TODO: Initialize to an appropriate value
            InsertarRadicadoPresenter target = new InsertarRadicadoPresenter(view); // TODO: Initialize to an appropriate value
            target.LoadRemitente();
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }
    }
}
